package com.xyw.code.gateway.admin.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/1/31
 * Time: 下午7:59
 * Email: 1328312923@qq.com
 * Description: 初使化Mybatis审计字段自动赋值的interceptor
 **/
@EnableTransactionManagement
@Configuration
public class MybatisConfig {
    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
